package meihua.stopcarapp.app;

import android.os.Handler;

import meihua.mylibrary.baseapp.BaseApplication;

/**
 * Name: LGZ
 * Time: 2017/4/20.
 * Dec:
 */

public class MyApplication extends BaseApplication {

    //获取到主线程的handler
    private static Handler mMainThreadHandler;
    //获取到主线程
    private static Thread mMainThread;
    //获取到主线程的id
    private static int mMainThreadId;
    //是否已经登陆
    private static boolean isLogin;

    public static boolean isLogin() {
        return isLogin;
    }

    public static void setIsLogin(boolean isLogin) {
        MyApplication.isLogin = isLogin;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        //初始化logger
//        LogUtils.logInit(BuildConfig.LOG_DEBUG);
    }

    public static Thread getMainThread() {
        return mMainThread;
    }

    public static void setMainThread(Thread mMainThread) {
        MyApplication.mMainThread = mMainThread;
    }

    public static int getMainThreadId() {
        return mMainThreadId;
    }

    public static void setMainThreadId(int mMainThreadId) {
        MyApplication.mMainThreadId = mMainThreadId;
    }

    public static Handler getMainThreadHandler() {
        return mMainThreadHandler;
    }

    public static void setMainThreadHandler(Handler mMainThreadHandler) {
        MyApplication.mMainThreadHandler = mMainThreadHandler;
    }
}
